package com.alibaba.sample.petstore.dal.dataobject;

import java.io.Serializable;

public class User implements Serializable {
    private static final long serialVersionUID = 6082016255564194370L;
    private String userId;
    private String password;
    private Account account;
    private Profile profile;

    public User() {
        setAccount(new Account());
        setProfile(new Profile());
    }

    public Account getAccount() {
        return account;
    }

    public void setAccount(Account account) {
        this.account = account;
        account.setUser(this);
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Profile getProfile() {
        return profile;
    }

    public void setProfile(Profile profile) {
        this.profile = profile;
        profile.setUser(this);
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }
}
